/*
 * XML Type:  AbstractSyncRequest
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.AbstractSyncRequest
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML AbstractSyncRequest(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class AbstractSyncRequestImpl extends net.ofx.types.x2003.x04.impl.AbstractRequestImpl implements net.ofx.types.x2003.x04.AbstractSyncRequest
{
    
    public AbstractSyncRequestImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TOKEN$0 = 
        new javax.xml.namespace.QName("", "TOKEN");
    private static final javax.xml.namespace.QName TOKENONLY$2 = 
        new javax.xml.namespace.QName("", "TOKENONLY");
    private static final javax.xml.namespace.QName REFRESH$4 = 
        new javax.xml.namespace.QName("", "REFRESH");
    private static final javax.xml.namespace.QName REJECTIFMISSING$6 = 
        new javax.xml.namespace.QName("", "REJECTIFMISSING");
    
    
    /**
     * Gets the "TOKEN" element
     */
    public java.lang.String getTOKEN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKEN$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "TOKEN" element
     */
    public net.ofx.types.x2003.x04.ServerIdType xgetTOKEN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServerIdType target = null;
            target = (net.ofx.types.x2003.x04.ServerIdType)get_store().find_element_user(TOKEN$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "TOKEN" element
     */
    public boolean isSetTOKEN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TOKEN$0) != 0;
        }
    }
    
    /**
     * Sets the "TOKEN" element
     */
    public void setTOKEN(java.lang.String token)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKEN$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TOKEN$0);
            }
            target.setStringValue(token);
        }
    }
    
    /**
     * Sets (as xml) the "TOKEN" element
     */
    public void xsetTOKEN(net.ofx.types.x2003.x04.ServerIdType token)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ServerIdType target = null;
            target = (net.ofx.types.x2003.x04.ServerIdType)get_store().find_element_user(TOKEN$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ServerIdType)get_store().add_element_user(TOKEN$0);
            }
            target.set(token);
        }
    }
    
    /**
     * Unsets the "TOKEN" element
     */
    public void unsetTOKEN()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TOKEN$0, 0);
        }
    }
    
    /**
     * Gets the "TOKENONLY" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getTOKENONLY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKENONLY$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "TOKENONLY" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetTOKENONLY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(TOKENONLY$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "TOKENONLY" element
     */
    public boolean isSetTOKENONLY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TOKENONLY$2) != 0;
        }
    }
    
    /**
     * Sets the "TOKENONLY" element
     */
    public void setTOKENONLY(net.ofx.types.x2003.x04.BooleanType.Enum tokenonly)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOKENONLY$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TOKENONLY$2);
            }
            target.setEnumValue(tokenonly);
        }
    }
    
    /**
     * Sets (as xml) the "TOKENONLY" element
     */
    public void xsetTOKENONLY(net.ofx.types.x2003.x04.BooleanType tokenonly)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(TOKENONLY$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(TOKENONLY$2);
            }
            target.set(tokenonly);
        }
    }
    
    /**
     * Unsets the "TOKENONLY" element
     */
    public void unsetTOKENONLY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TOKENONLY$2, 0);
        }
    }
    
    /**
     * Gets the "REFRESH" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getREFRESH()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFRESH$4, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "REFRESH" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetREFRESH()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(REFRESH$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "REFRESH" element
     */
    public boolean isSetREFRESH()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REFRESH$4) != 0;
        }
    }
    
    /**
     * Sets the "REFRESH" element
     */
    public void setREFRESH(net.ofx.types.x2003.x04.BooleanType.Enum refresh)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFRESH$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFRESH$4);
            }
            target.setEnumValue(refresh);
        }
    }
    
    /**
     * Sets (as xml) the "REFRESH" element
     */
    public void xsetREFRESH(net.ofx.types.x2003.x04.BooleanType refresh)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(REFRESH$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(REFRESH$4);
            }
            target.set(refresh);
        }
    }
    
    /**
     * Unsets the "REFRESH" element
     */
    public void unsetREFRESH()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REFRESH$4, 0);
        }
    }
    
    /**
     * Gets the "REJECTIFMISSING" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getREJECTIFMISSING()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REJECTIFMISSING$6, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "REJECTIFMISSING" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetREJECTIFMISSING()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(REJECTIFMISSING$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "REJECTIFMISSING" element
     */
    public void setREJECTIFMISSING(net.ofx.types.x2003.x04.BooleanType.Enum rejectifmissing)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REJECTIFMISSING$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REJECTIFMISSING$6);
            }
            target.setEnumValue(rejectifmissing);
        }
    }
    
    /**
     * Sets (as xml) the "REJECTIFMISSING" element
     */
    public void xsetREJECTIFMISSING(net.ofx.types.x2003.x04.BooleanType rejectifmissing)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(REJECTIFMISSING$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(REJECTIFMISSING$6);
            }
            target.set(rejectifmissing);
        }
    }
}
